package org.example.service;

import cn.jbit.pojo.Order;
import org.example.fallback.FallbackFailProcess;
import org.example.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.concurrent.Future;

/**
 * @author 张在成
 */
@FeignClient(value = "order-service-rest",fallbackFactory = FallbackFailProcess.class)
public interface OrderService {


    /**
     * 根据订单id查询订单信息
     * @param orderId
     * @return
     * @throws Exception
     */
    @RequestMapping("/orderRemote/{orderId}")
    Order selectOrderByOrderId(@PathVariable("orderId") Integer orderId) throws Exception;

    /**
     * 获取订单信息列表
     * @return  Order
     */
    @RequestMapping("/orderListRemote/")
    List<Order> getOrderList();

    /**
     * 根据多个id查询订单信息
     */
    @RequestMapping(value = "/orderRemoteIds")
    List<Order> selOrderListByIds(List<Integer> list);



}
